﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Common
{
    public class ConfigHelper
    {
        /// <summary>
        /// 分页
        /// </summary>
        /// <returns></returns>
        public static int PageSize()
        {
            return Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["PageSize"]);
        }

        #region 产品图片配置
        /// <summary>
        /// 产品图片宽度
        /// </summary>
        /// <returns></returns>
        public static int AlbumWidth()
        {
            try
            {
                return Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["AlbumWidth"]);
            }
            catch (Exception)
            {

                return 175;
            }
        }
        /// <summary>
        /// 产品图片高度
        /// </summary>
        /// <returns></returns>
        public static int AlbumHeight()
        {
            try
            {
                return Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["AlbumHeight"]);
            }
            catch (Exception)
            {

                return 228;
            }
        }
        #endregion

        #region   账号密码加密
        public static String  GetPwdKey()
        {
            return Convert.ToString(System.Configuration.ConfigurationManager.AppSettings["PwdKey"]);
        }
        #endregion
    }
}
